/* character_attribute_panel/frontend/css/style.css */
:root {
  --primary-color: #3b82f6;
  --secondary-color: #10b981;
  --tertiary-color: #8b5cf6;
  --background-dark: #1f2937;
  --background-light: #f3f4f6;
  --text-light: #f9fafb;
  --text-dark: #1f2937;
  --attribute-increase: #10b981;
  --attribute-decrease: #ef4444;
}

body {
  background: linear-gradient(135deg, #1a2a3a 0%, #0f172a 100%);
  color: var(--text-light);
  min-height: 100vh;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

.panel {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(8px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

.panel:hover {
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
  transform: translateY(-2px);
}

.attribute-category {
  background: rgba(15, 23, 42, 0.6);
  border-radius: 12px;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.attribute-category:hover {
  transform: translateY(-3px);
}

.attribute-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s ease-in-out;
}

.attribute-item:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
}

.attribute-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
}

.attribute-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.attribute-value {
  font-weight: 600;
  transition: all 0.3s;
}

.attribute-value.increase {
  color: var(--attribute-increase);
  animation: pulse 0.6s ease-in-out;
}

.attribute-value.decrease {
  color: var(--attribute-decrease);
  animation: shake 0.6s ease-in-out;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.chart-container {
  height: 200px;
  position: relative;
  margin: 20px 0;
  transition: transform 0.3s ease;
}

.chart-container:hover {
  transform: scale(1.02);
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
}

.btn {
  background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
  border: none;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 2px 10px rgba(59, 130, 246, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.5);
}

.btn:active {
  transform: translateY(0);
}

/* Modal styles */
.modal {
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-content {
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal.show .modal-content {
  transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.6);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--tertiary-color);
}

/* Tooltip styles */
.tooltip {
  position: absolute;
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-light);
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.875rem;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
  pointer-events: none;
}

.tooltip.show {
  opacity: 1;
  transform: translateY(0);
}

/* Animation for newly added attributes */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.5s forwards;
}

/* Animation for attribute increase/decrease buttons */
.attribute-btn {
  transition: all 0.2s ease;
}

.attribute-btn:hover {
  transform: scale(1.1);
}

.attribute-btn:active {
  transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .attribute-category {
    padding: 12px;
  }
  
  .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
  }
  
  .chart-container {
    height: 180px;
  }
}

/* Custom styles for import/export modal */
.import-export-modal {
  background: rgba(30, 41, 59, 0.95);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-textarea {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  resize: none;
}

.modal-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Progress indicators */
.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.5s ease;
}
